home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1996 September
/
JCSM Shareware Collection (JCS Distribution) (September 1996).ISO
/
prgtools
/
vtools21.zip
/
MCGALIB.H
< prev
next >
Wrap
Text File
|
1994-05-30
|
3KB
|
98 lines
/*
MCGALIB
(c) 1993/94 D.G. Sureau
These functions are for VGA 19,
320 x 200, 256 colors screen
*/
/* Graphic window variables */
extern int XL; /* Default = 0 */
extern int XR; /* Default = 319 */
extern int YB; /* Default = 0 */
extern int YT; /* Default = 199 */
extern unsigned char COLOR256; /* Color for pixels */
extern unsigned char TEXTCOLOR; /* Color for text display */
extern unsigned char BACKCOLOR; /* Color for text background */
extern unsigned long *SPVECTOR; /* Pointer on sprites adr. */
extern char *SPCODE; /* Pointer on sprites code */
extern unsigned int VGASCREEN; /* Segment of VGA graphic screen */
void selectscreen(int mode);
/* Change screen resolution
Mode = 19 MCGA
Mode = 3 Text
*/
void window19(int xl,int yb,int xr,int yt); /* Define graphic window */
void cls19(int col); /* Clear the whole screen */
void DOSwrite(int x,int y,char *txt);
/* Displays text at x,y with TEXTCOLOR color # */
char *getspadr(int number); /* Gets absolute adr of sprite in table */
void sprite256( int x,int y,char *ptr);
/* Puts spr. over background, inside a window */
void csprite256(int x,int y,char *ptr);
/* Puts spr. erases background, without clipping */
void csprite256c(int x,int y,char *adr);
/* Puts spr. erases background, inside a window */
void xsprite256(int x,int y,char *adr);
/* Display a sprite in XOR mode */
void sprite(int number, int x,int y, unsigned char mode);
/* Puts sprite number #nn,
valid modes in sprlib are:
0 = copy
4 = over background
*/
/* Function for saving and restoring block of screen */
void putblock(int x,int y,char *ptr);
void getblock(int lft,int bottom,int rght,int hight,char *ptr);
void icon19(int x,int y,char *ptr); /* Put a 16 color icon on screen */
void writeRGB(char *adr); /* Set 256 color palette from file */
void writecolor(int colnum,int r,int g,int b); /* Create a color */
void setpix256(int x,int y,unsigned char color); /* Put a pixel */
int getpix256(int x,int y); /* Get color of pixel at x, y */
void line256(int x,int y,int x2,int y2, unsigned char color);
/* Draw a line from x, y to x2, y2 */
void rectangle(int l,int b,int r,int t); /* Put a rectangle */
void fillblock(int l,int b,int r,int h,int color);
/* Fill a rectangle with a color among 256 */
void writeRGB(char *adr); /* Change the full palette */
void writecolor(char creg,char r,char g,char b);
/* Set color register for a color number */
void synchro(); /* Wait for a screen refresh */
void appear(char *palette); /* Make the screen slowly appearing */
void disappear(char *palette); /* Make the screen slowly disappearing */
void MCGAscroll(char decal); /* Full screen scolling, BIOS */
void scroll(int dir,int step);
/* Scrolling of the user-defined window
Step is the number of pixels to move
Dir is the direction:
1 = up
2 = right
3 = down
4 = left
*/